The present disclosure relates generally to a method for communicating data, and in particular, to a method of modulating a carrier frequency to enable nondestructive bitwise arbitration of a communication medium.
The federal government mandates periodic inspection of active warning devices deployed at railroad-highway crossings. Deployment of sensors at a railroad crossing affords the ability to continuously and remotely monitor such warning devices. Flashing lights are one such active warning device typically installed to warn motorists at a crossing. Flashing lights are installed in pairs and normally at least two such pairs are present. At a typical railroad crossing, the flashing light activation and control equipment is located in a bungalow or small cabinet near the railroad crossing. An attractive way to utilize sensors for such a centrally controlled warning system is to exploit the advantages of microprocessors that utilize the Controller Area Network (CAN) protocol.
The CAN bus implements a broadcast serial communications protocol that is built into many currently available micro-controllers. CAN hardware supplies to the user a transparent and fully debugged data-link layer, including packetization of data, error-detection coding and transmission of acknowledgement bits. In addition, parts of the physical layer, notably bit synchronization and multiple access arbitration, are also implemented in CAN. However, the specifics of the communication medium are not given in the CAN specification; this was left open to allow flexibility to system designers.
The CAN protocol is based on carrier-sense multiple access with collision detection (CSMA/CD) using non-destructive bitwise priority arbitration. That means that, prior to transmitting data, each CAN node monitors the transmission medium to see if it is in use; if it is not in use for a fixed period of time, the node starts to transmit. If two nodes transmit at the same time, the node transmitting the higher priority message will end up transmitting its whole message, while the other node will terminate its transmission once it finds that it is sending the lower priority message. This is what is meant by xe2x80x9cnon-destructive priority arbitration.xe2x80x9d In order to support this feature, the medium must support the transmission of binary symbols having a xe2x80x9cdominantxe2x80x9d logic state and a xe2x80x9crecessivexe2x80x9d logic state. These logic states are defined by the way in which they interact when different transmitters are using the medium at the same time. When one node is sending a dominant bit and second is sending a recessive bit, all the nodes in the system, including the node sending the recessive bit, sense the medium as being in the dominant state. This holds true no matter how many nodes assert the recessive state. The CAN standard adopted as ISO11898 utilizes a differential 5 Volt bus on twisted pair wires as the communication medium. A voltage differential in excess of 1.0 Volt represents a dominant bus state equivalent to a logic zero while a voltage differential less than 0.5 Volts represents a recessive bus state equivalent to logic one.
In addition, any number of nodes must be able to assert the dominant state simultaneously without interfering with each other. When a node asserts the recessive state and senses that the bus is in the dominant state, that node knows that it has lost the priority arbitration for the channel, and it stops transmitting at once. Cancellation can occur between out-of-phase carriers when implementing the CAN protocol with a modulated signaling scheme as the physical layer, when two or more non-synchronous transmitters attempt to assert the dominant bus state simultaneously, as happens routinely during bus priority arbitration or when a bus error is detected.
One aspect of the invention is a system for modulating a carrier frequency to support nondestructive bitwise arbitration of a communication medium. The system comprises a first sensor module coupled to a power supply line via a first power line coupling circuit. The first sensor module comprises a first micro-controller and a first transceiver. The first transceiver includes a first transmitter for converting a digital signal received from the first micro-controller into a first analog signal for transmission over the power supply line. The first transmitter includes a first oscillator operating within an allowable frequency deviation to provide a first predetermined onset phase. The system further comprises a second sensor module coupled to the power supply line via a second power line coupling circuit. The second sensor module comprises a second micro-controller and a second transceiver. The second transceiver includes a second transmitter for converting a digital signal received from the second micro-controller into a second analog signal for transmission over the power supply line. The second transmitter includes a second oscillator operating within the allowable frequency deviation to provide a second predetermined onset phase. The second analog signal is different from the first analog signal and the second predetermined onset phase is different from the first predetermined onset phase. The difference between the first predetermined onset phase and the second predetermined onset phase is within a limit.
Another aspect of the invention is a system for modulating a carrier frequency to support nondestructive bitwise arbitration of a communication medium. The system comprises a sensor module locally coupled to a warning system for sensing operational performance of the warning system. The sensor module is also locally coupled to a power supply line. The sensor module comprises a sensor element for transducing physical phenomena into electrical signals. The sensor module further comprises a micro-controller that exchanges data according to the controller area network (CAN) standard coupled to the sensor element. The sensor module further comprises a transceiver coupled to the micro-controller, where the transceiver is responsive to CAN bus states issued by the micro-controller for communicating data between the power supply line and the micro-controller. The transceiver includes a transmitter for converting a digital signal from the micro-controller into an analog signal for transmission on the power supply line. The transmitter includes an oscillator operating within an allowable frequency deviation to provide a predetermined onset phase and the transmitter utilizes on/off shift keying for modulation. The transceiver also includes a receiver for converting the analog signal from the power supply line into a digital signal for input to the micro-controller. The receiver includes an in-band energy detector. The system further comprises a sensor hub coupled to the power supply line for receiving data from the sensor module via the power supply line.
A further aspect of the invention is a method for modulating a carrier frequency to support nondestructive bitwise arbitration of a communication medium. The method comprises receiving a request to initiate data transfer including a first CAN formatted message frame with a first identifier. The request is received from a first micro-controller located at one of a plurality of nodes coupled to a power supply line. The method further comprises detecting an idle CAN bus on the power supply line and sending the first CAN formatted message frame across the power supply line using a first transceiver operating under the CAN protocol. The first transceiver includes a first transmitter that includes a first oscillator operating within an allowable frequency deviation and sending the first CAN formatted message frame includes turning on the first oscillator in a first predetermined onset phase in response to detecting a dominant bit in the first identifier to implement the CAN protocol over the power supply line. The method further comprises sending a second CAN formatted message frame including a second identifier across the power supply line using a second transceiver operating under the CAN protocol. The second transceiver includes a second transmitter that includes a second oscillator operating within the allowable frequency deviation. Sending the second message frame includes turning on the second oscillator in a second predetermined onset phase in response to detecting a dominant bit in the second identifier to implement the CAN protocol over the communication medium. The second predetermined onset phase is different from the first predetermined onset phase and the difference between the first predetermined onset phase and the second predetermined phase is within a limit.
Further aspects of the invention are disclosed herein. The above discussed and other features and advantages of the invention will be appreciated and understood by those skilled in the art from the following detailed description and drawings.